using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Eureka.modelos;

namespace Eureka
{
    public partial class logoff : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // inserindo no log
            Log log = new Log((int)Session["id"], "Logoff", 0);
            log.criar();

            // setando a flag
            Administrador admin = new Administrador((int)Session["id"]);
            admin.deslogar();

            Response.Clear();
            Session.Clear();
            FormsAuthentication.SignOut();
        }
    }
}
